


FROM maven:3.5-jdk-8-alpine as builder

# Copy local code to the container image.
WORKDIR /app
COPY pom.xml .
COPY src ./src

# 把 已经打好的 jar 包复制到容器中. 并起名为 wechat.jar. 后面的启动语句也要进行改
# COPY ./target/java_chatroom-0.0.1-SNAPSHOT.jar chatroom.jar
COPY target/yupao-backend-0.0.1-SNAPSHOT.jar yupao.jar

# Build a release artifact.
# RUN mvn package -DskipTests

# Run the web service on container startup.
# CMD ["java","-jar","/app/target/java_chatroom-0.0.1-SNAPSHOT.jar","--spring.profiles.active=prod"]
CMD ["java","-jar","yupao.jar","--spring.profiles.active=prod"]